package com.acwing.partition21;

import java.io.*;

/**
 * @author rkc
 * @date 2022/8/12 9:29
 */
public class AC2070自行车之旅 {

    private static final int N = 110;
    private static int[] w = new int[N];
    private static int n;

    private static StreamTokenizer tokenizer = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
    private static PrintWriter writer = new PrintWriter(new OutputStreamWriter(System.out));

    public static void main(String[] args) throws IOException {
        int t = nextInt();
        for (int k = 1; k <= t; k++) {
            n = nextInt();
            for (int i = 0; i < n; i++) w[i] = nextInt();
            int ans = 0;
            for (int i = 1; i < n - 1; i++) {
                if (w[i] > w[i - 1] && w[i] > w[i + 1]) {
                    ans++;
                }
            }
            writer.format("Case #%d: %d\n", k, ans);
        }
        writer.flush();
    }

    private static int nextInt() throws IOException {
        tokenizer.nextToken();
        return (int) tokenizer.nval;
    }
}
